package sync.hw.demo02;

/**
 * @author lwj
 * @date 2025-03-12
 * @vesion 1.0.0
 */
public class MainTest {
    public static void main(String[] args) {
        // 创建用户信息
        UserInfo ls = new UserInfo("李四",new char[]{'A','A','A','A','A','A','A'});
        UserInfo ww = new UserInfo("王五",new char[]{'B','B','B'});

        // 实例化 Runnable 对象
        MyRunnable mr1 = new MyRunnable(ls);
        MyRunnable mr2 = new MyRunnable(ww);

        // 实例化 Thread
        Thread t1 = new Thread(mr1);
        Thread t2 = new Thread(mr2);

        // 启动线程
        t1.start();
        t2.start();
    }
}
